# Kernel modules
obj-m += hello_module.o

# 多个.c模块时如下编写
# obj-m := modulename.o
# modulename-objs:=file1.o file2.o

# Specify flgs for the module compilation
# 开启EXTRA_CFLAGS可以得到包含调试信息的xxx.ko模块
# EXTRA_CFLAGS=-G -O0 

#kernel_path:=/lib/modules/$(shell uname -r)/build
kernel_path:=/home/supanyang/u-boot/linux-3.0.85

build:kernel_modules

kernel_modules:
    make -C $(kernel_path) M=$(CURDIR) modules

clean:
    make -C $(kernel_path) M=$(CURDIR) clean